<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xml:space="preserve">
    <xsl:output method="html" indent="yes" encoding="UTF-8" />
    <xsl:template name="error-message">
        <xsl:param name='title'/>
        <xsl:param name='text'/>
        <div style='width: 400px; border: 1px solid red; margin: 50 auto;'>
            <div style='background-color: red; color: white; height: 30px; text-align: left; padding-left: 20px; font-size: 150%;'>
                <xsl:value-of select="$title"/>
            </div>
            <div style='background-color: white; color: black; margin: 20px; text-align: left;'>
                <xsl:value-of select="$text"/>
            </div>
        </div>
    </xsl:template>
    <xsl:template name="message-redirect">
        <xsl:param name='title'/>
        <xsl:param name='text'/>
        <xsl:param name='url'/>
        <div style='width: 400px; border: 1px solid red; margin: 50 auto;'>
            <div style='background-color: #666; color: white; height: 30px; text-align: left; padding-left: 20px; font-size: 150%;'>
                <xsl:value-of select="$title"/>
            </div>
            <div style='background-color: white; color: black; margin: 20px; text-align: left;'>
                <xsl:value-of select="$text"/><br/>
                Вы будете автоматически перенаправлены в течении пяти секунд на эту <a href='{url}'>ссылку</a>.
            </div>
            <![CDATA[
                <script type='text/javascript'>
                    function navigate(url) {
                        setTimeout("document.location.href = '"+url+"';", 5000);
                    }
                </script>
            ]]>
            <img src='/spacer.gif' onload='navigate("{$url}");'/>
        </div>
    </xsl:template>

</xsl:stylesheet>